import { ApiProperty } from '@nestjs/swagger';
import { IsEmail, IsEnum } from 'class-validator';
import { OperationType } from '../../shared/enum';

export class SendCaptchaDto {
  @ApiProperty({
    example: '1482983936@qq.com',
    description: '邮箱',
  })
  @IsEmail()
  email: string;

  @ApiProperty({
    example: 'register',
    description: '操作类型(resetPassword)',
  })
  @IsEnum(OperationType)
  operationType: OperationType;
}
